<?php
$content = new Models_Comment();
$list = $content->getComments('admlist');
$adm = new Models_Adm();
echo '<table class="table table-striped">';
echo '<thead><tr>
        <th>#</th><th>name</th><th>created/modified</th><th>actions</th>
      </tr></thead>
      <tbody class="all-articles">';
foreach ($list as $num => $comment)
{
    if($comment['active'] == '1')
    {
        $active = '<i class="icon-ok-sign"></i>';
    } else {
        $active = '<i class="icon-remove-sign"></i>';
    }
    if($comment['visible'] == '1')
    {
        $visible = '<i class="icon-eye-open"></i>';
    } else {
        $visible = '<i class="icon-eye-close"></i>';
    }
    $num++;
    echo "<tr>
        <td>$num</td><td>[$active|$visible]" . $comment['title'] . "</td><td>" . $comment['created'] . "</td>
            <td><a href=\"/" . $adm->path . "adm/editcomment/" .
            $comment['id'] .
            "\"><span class=\"btn btn-primary btn-mini\"><i class=\"icon-pencil icon-white\"></i></span></a></td>";
}
echo '</tr></tbody></table>';
?>